#ifndef __CALC_MEDIAN_H__
#define __CALC_MEDIAN_H__

class CalcMedian {
public:
    CalcMedian();
    ~CalcMedian();

    int getMedian(int n);

private:
    bool addElemMaxHeap(int elem);
    bool addElemMinHeap(int elem);

    int getRootMaxHeap();
    int getRootMinHeap();

private:
    int *min_heap, *max_heap;
    int min_heap_size, max_heap_size;
    int min_heap_capacity, max_heap_capacity;
};

#endif

